package com.zhongfeng.api.modules.quality.controller;

import com.zhongfeng.api.modules.customer.vo.params.CustomerParams;
import com.zhongfeng.api.modules.quality.service.QualityService;
import com.zhongfeng.api.modules.quality.vo.params.QualityParams;
import com.zhongfeng.api.modules.utils.pojo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
/**
 * @author blueCat
 * @date 2023/2/8 10:17
 * @motto life is a gift
 */
@RestController
@RequestMapping("/api/quality")
@Slf4j
public class QualityController {

    @Autowired
    private QualityService qualityService;

    /**
     * 查询全部质检信息
     *
     * @param params
     * @return
     */
    @PostMapping("/queryAllQuality")
    public Result queryAllQuality(@RequestBody QualityParams params) {
        return qualityService.queryAllQuality(params);
    }

    /**
     * 新增质检信息
     *
     * @param params
     * @return
     */
    @PostMapping("/addQuality")
    public Result addQuality(@RequestBody QualityParams params, HttpServletRequest request) {
        return qualityService.addQuality(params, request);
    }
//
//    /**
//     * 删除客户信息
//     *
//     * @param params
//     * @return
//     */
//    @PostMapping("/deleteCustomer")
//    public Result deleteCustomer(@RequestBody CustomerParams params) {
//        return customerService.deleteCustomer(params.getId());
//    }
//
//    /**
//     * 修改客户信息
//     *
//     * @param params
//     * @return
//     */
//    @PostMapping("/updateCustomer")
//    public Result updateCustomer(@RequestBody CustomerParams params, HttpServletRequest request) {
//        return customerService.updateCustomer(params, request);
//    }
}
